package com.gok.pay;

import com.alibaba.fastjson.JSONObject;
import lombok.extern.slf4j.Slf4j;
import org.junit.Test;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by zhuwenquan on 2018-01-10.
 */
@Slf4j
public class MainTest {
    @Test
    public void testJson() {
        JSONObject jsonObject = new JSONObject();
        Map<String, String> map = new HashMap<>();
        map.put("k1", "v1");
        map.put("k2", "v2");
        jsonObject.put("map", map);
        log.info(jsonObject.toString());
        log.info(jsonObject.toJSONString());
    }
}
